package com.volkanic.buttons;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Vector2;

/**
 * Created by Lucas on 23/07/2014.
 */
public class MenuButton {
    private ModelButton _model;

    public static MotionTextButton CreateMenuButton(String text, float speed, Vector2 curPos, Vector2 endPos){
        MenuButton button = new MenuButton(text, speed, curPos, endPos);
        return button.GenerateButton();
    }

    private MenuButton(String text, float speed, Vector2 curPos, Vector2 endPos){
        _model = new ModelButton();

        _model.text = text;

        // Font
        _model.pathToFont = "font.fnt";
        _model.scaleFont = 2f;

        // Skin
        _model.pathToSkin = "wooden-button.atlas";

        // Style
        _model.styleUp = "wood";
        _model.styleDown = "wood-pressed";
        _model.styleOver = "wood-pressed";

        // motion
        _model.speed = speed;
        _model.currentPosition = curPos;
        _model.lastPosition = endPos;
    }

    private MotionTextButton GenerateButton(){
        return GenericButton.CreateButton(_model);
    }
}
